package com.pojo;

/**
 * 自定义Authentication对象，使得Subject除了携带用户的登录名外还可以携带更多信息
 */
public class ShiroAdmin {
    public int id;
    public String name;
    public String pwd;
    public int shiroRoleId;

    public ShiroAdmin() {
    }

    public ShiroAdmin(int id, String name, String pwd, int shiroRoleId) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;
        this.shiroRoleId = shiroRoleId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public int getShiroRoleId() {
        return shiroRoleId;
    }

    public void setShiroRoleId(int shiroRoleId) {
        this.shiroRoleId = shiroRoleId;
    }


    /**
     * 本函数输出将作为默认的<shiro:principal/>输出.
     */
    @Override
    public String toString() {
        return name;
    }
}
